format fecimal in f string py

105

format fecimal in f string py -

>>> a = 10.1234
>>> f'{a:.2f}'
'10.12'

Comments

Submit
0 Comments